package com.tuanzi.loan.business.repository.receipt.product;

import java.util.List;

import com.tuanzi.loan.business.entity.receipt.product.ReceiptProductInfo;
import com.tuanzi.loan.business.repository.receipt.product.custom.ReceiptProductInfoRepositoryCustom;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.server.loan_base.constant.LoanReceiptProductStatus;

/**
 * @author Ray 2018/03/05
 */
public interface ReceiptProductInfoRepository extends ReceiptProductInfoRepositoryCustom, JPAAuditRepository<ReceiptProductInfo, Long> {

	/**
	 * 根据系统用户id和产品状态范围查找产品
	 *
	 * @param userId
	 * @param statusIn
	 * @return
	 */
	List<ReceiptProductInfo> findProductInfoByUserIdAndStatusIn(String userId, List<LoanReceiptProductStatus> statusIn);

	ReceiptProductInfo findBySortAndStatusIn(Integer sort, List<LoanReceiptProductStatus> statusIn);
}
